
class Base{
    var data1:Int
    init(){
        data1=100
        print("\(data1)")
        print("Base.init")
    }
    
    deinit{
        print("Base.deinit")
    }
}

class Sub: Base{
    var data2=200
     override init(){
        super.init()
        print("\(data1), \(data2)")
        print("Sub.init")
    }
    deinit{
        print("Sub.deinit")
    }
}

func process(){
    var b:Base
    b=Base()
    print("----------")
    
    var s:Base
    s=Sub()
    print("----------")
}

process()


